<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}

        ======
        <father></father>
    </div>
    <script type='text/javascript'>

        /* 组件创建的步骤
        
        1、准备模板
        2、挂载到父组件上
        3、填坑====填到父组件中
        
         */
        var son = {
            template: `
                <span>这是一个son组件</span>
            `
        }
        var father = {
            template: `
                <div>这是一个father组件=====<son></son></div>
            `,
            components: {
                son
            }
        }



        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue'
            },
            components: {
                father
            }
        });
    </script>
</body>

</html>